<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>添加核心信息</title>
  <script>
    if(/http:/.test(location.href)) location.href = location.href.replace(/http:/, 'https:')
  </script>
  <script src="https://cdn.jsdelivr.net/npm/babel-polyfill/dist/polyfill.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/jquery"></script>
  <script src="__PUBLIC__/script/blank.js"></script>
  <script src="__PUBLIC__/script/jquery-ui/jquery-ui.min.js"></script>
  <script src="__PUBLIC__/script/tagEditor/jquery.tag-editor.min.js"></script>
  <script src="__PUBLIC__/script/tagEditor/jquery.caret.min.js"></script>
  <script src="__PUBLIC__/node_modules/really-simple-colorpicker/js/jquery.colorPicker.min.js"></script>
  <script src="__PUBLIC__/node_modules/flyio/dist/fly.min.js"></script>
  <!-- 征信组件 -->
  <script src="__PUBLIC__/script/zhengxin_component.js"></script>
  <!-- 关联组件 -->
  <script src="__PUBLIC__/script/guanlian_component.js"></script>
  <!-- 推荐以及海报组件 -->
  <script src="__PUBLIC__/script/adBtn_n_ad.js"></script>

  <!-- 弹层 -->
  <script src="__PUBLIC__/script/layer/layer.js"></script>
  <!-- select2库，用于多选下拉 -->
  <script src="__PUBLIC__/node_modules/select2/dist/js/select2.full.min.js"></script>
  <script src="__PUBLIC__/node_modules/select2/dist/js/i18n/zh-CN.js"></script>
  <!-- 自由添加标签 -->
  <script src="__PUBLIC__/script/add_free_options.js" defer></script>
  <!-- 特性侦测库 -->
  <script src="__PUBLIC__/script/modernizr-custom.js"></script>

  <link rel="stylesheet" href="__PUBLIC__/node_modules/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="__PUBLIC__/style/base.css">
  <link rel="stylesheet" href="__PUBLIC__/script/tagEditor/jquery.tag-editor.css">
  <link rel="stylesheet" href="__PUBLIC__/script/jquery-ui/jquery-ui.min.css">
  <link rel="stylesheet" href="__PUBLIC__/node_modules/really-simple-colorpicker/css/colorPicker.css" type="text/css" />
  <!-- select2库，用于多选下拉 -->
  <link rel="stylesheet" href="__PUBLIC__/node_modules/select2/dist/css/select2.min.css" type="text/css" />
  <!-- 征信组件 -->
  <link rel="stylesheet" href="__PUBLIC__/style/zhengxin_component.css" type="text/css" />
  <!-- 关联组件 -->
  <link rel="stylesheet" href="__PUBLIC__/style/guanlian_component.css" type="text/css" />
  <!-- 推荐以及海报组件 -->
  <link rel="stylesheet" href="__PUBLIC__/style/adBtn_n_ad.css" type="text/css" />

  <link rel="stylesheet" href="__PUBLIC__/style/add_adv_chanpin.css">
  <style>
    /* 颜色选择器靠右 */
    .colorPicker-picker {
      float: right;
    }
    .kaohe_box .colorPicker-picker {
      margin-top: 4px;
    }
    .tag-editor .tag-editor-delete { display: none; }
    /* 多选组件在layer下没法看见 */
    .select2-container--open {
      /* 比layui加1 */
      z-index: 99891018;
    }
  </style>
</head>
<body>
  <script id='alt_form_data'>
    let altFormDataZhengxin = `{$new_x_data[1]}`;
    let altFormDataZhengxiYuqi = `{$new_x_data[0]}`;
    let altformDataHaibao = `{$new_x_data[2]}`;
    // [3]是关联，后端自己渲染
    let altformDataTuijian = `{$new_x_data[4]}`;
    window.altFormData = {
      altFormDataZhengxin: altFormDataZhengxin,
      altformDataHaibao: altformDataHaibao,
      altformDataTuijian: altformDataTuijian,
      altFormDataZhengxiYuqi: altFormDataZhengxiYuqi
    }
  </script>
  <input type="hidden" name="获取小类标签ajax地址" id="get_xiaolei_tag" value = "{:U('daleiajax')}">
  <input type="hidden" name="添加小类标签ajax地址" id="add_xiaolei_tag" value = "{:U('suoyoubiaoqian')}">
  <input type="hidden" name="添加利息ajax地址" id="add_lixi" value = '{:U('Wxauthorise/ajax_add_lx')}'>
  <input type="hidden" name="删除利息ajax地址" id="del_lixi" value = "{:U('del_lx')}">
  <input type="hidden" name="获取新自由表单ajax地址" id="get_new_free_form" value = "{:U('Wxauthorise/biaoqian_ajax')}">
  <input type="hidden" name="获取自由表单数据ajax地址" id="get_free_form_data" value = "{:U('Wxauthorise/re_m_data')}">
  <input type="hidden" name="增加征信查询条目" id="post_new_zhengxin_require" value = "{:U('Wxauthorise/ajax_add_zx_times')}">
  <input type="hidden" name="增加征信逾期查询条目" id="post_new_zhengxin_yuqi_require" value = "{:U('Wxauthorise/ajax_add_zx_see')}">
  <input type="hidden" name="删除征信查询条目" id="post_remove_zhengxin_require" value = "{:U('Wxauthorise/ajax_del_zx_times')}">
  <input type="hidden" name="删除征信逾期查询条目" id="post_remove_zhengxin_yuqi_require" value = "{:U('Wxauthorise/ajax_del_zx_see')}">
  <input type="hidden" name="提交征信条目" id="post_updata_zhengxin_require" value = "{:U('Wxauthorise/ajax_update_zx_times')}">
  <input type="hidden" name="提交征信逾期条目" id="post_updata_zhengxin_yuqi_require" value = "{:U('Wxauthorise/ajax_update_zx_sees')}">
  <input type="hidden" name="大类列表 ajax 请求" id="post_ajax_get_dalei" value = "{:U('Wxauthorise/ajax_get_dalei')}">
  <input type="hidden" name="获取小类" id="post_ajax_get_cpclass" value = "{:U('Wxauthorise/ajax_get_cpclass')}">
  <input type="hidden" name="获取小名" id="post_ajax_get_litter_name" value = "{:U('Wxauthorise/ajax_get_litter_name')}">
  <input type="hidden" name="产品关联添加" id="post_ajax_add_goods_links" value = "{:U('Wxauthorise/ajax_add_goods_links')}">
  <input type="hidden" name="产品关联删除" id="post_ajax_del_goods_links" value = "{:U('Wxauthorise/ajax_del_goods_links')}">
  <input type="hidden" name="产品关联更新" id="post_ajax_update_goods_links" value = "{:U('Wxauthorise/ajax_update_goods_links')}">
  <input type="hidden" name="产品海报提交" id="post_ajax_add_goods_ad" value = "{:U('Wxauthorise/ajax_add_goods_ad')}">
  <input type="hidden" name="产品海报更新" id="post_ajax_update_goods_ad" value = "{:U('Wxauthorise/ajax_update_goods_ad')}">
  <input type="hidden" name="产品推荐添加" id="post_ajax_add_goods_diy_name" value = "{:U('Wxauthorise/ajax_add_goods_diy_name')}">
  <input type="hidden" name="产品推荐更新" id="post_ajax_update_goods_diy_name" value = "{:U('Wxauthorise/ajax_update_goods_diy_name')}">
  <input type="hidden" name="标签删除" id="ajax_del_biaoqian" value = "{:U('Wxauthorise/ajax_del_biaoqian')}">
  <div style='display:none;'>
    <!-- url 拼接方式：`example?新标签` -->
    <input type="text" id='get_new_tag_id' name='get_new_tag_id' value = "{:U('suoyoubiaoqian')}" disabled>
    <!-- 暂时留在这里当占位，可不填，暂时没用 -->
    <input type="text" id='pro_id' name='pro_id' value = '99999' disabled>
  </div>
  <div class="main_content">
    <form action="{:U('chanpin_add')}" id='all' method="POST" autocomplete="off" onsubmit="return submit_top_lever(this, event)" onkeydown="if(event.keyCode==13) return false;">
		<input type='hidden' name='id' value='{$info}'>
      <select name="dalei" id="dalei">
        <option value="" selected>产品大类</option>
		<volist name='bm' id='vo'>
        <option value="{$vo.id}">{$vo.name}</option>
    </volist>
      </select>
      <input type="text" name = 'litter_name' placeholder="产品小名" style='border:1px solid #ccc;line-height:2rem;' value='{$goods.litter_name}' required>

      <div class="lixi_fenbu sec_box">
        <div class="title">利息与额度分布<span id = 'add_new_lixi'><img src="__PUBLIC__/images/set_chanpin_popup/u546.png" alt="u546" style="width:100%"></span><br></div>
		<empty name="lx">
			 <!-- <div class="lixi_fenbu_main">
			  <input type="text" name="sanwei[lixi][lixi_min]" placeholder="最低利息" value='' required>
			  <input type="text" name="sanwei[lixi][lixi_max]" placeholder="最高利息" value='' required>
			  <input type="text" name="sanwei[lixi][edu_min]" placeholder="最低额度" value='' required>
			  <input type="text" name="sanwei[lixi][edu_max]" placeholder="最高额度" value='' required>
			  <select name="sanwei[lixi][huankuan]" id="huankuan" required  select-data = "{$vo.repayments}" class = 'huankuan_fangshi'>
			  <option value="0" selected>还款方式</option>
			  <option value="等额本息">等额本息</option>
			  <option value="等额本金">等额本金</option>
			  <option value="等本等息">等本等息</option>
			  <option value="先息后本">先息后本</option>
			  </select>
        <input type="num" name = 'sanwei[lixi][fenqi_max]' placeholder="最长分期 1~360" value='{$vo.fangkuan_time}' required>
			  <input type="text" name="sanwei[lixi][fangkuan_shouxufei]" placeholder="放款手续费" value='{$vo.handling}' required>
			  <input type="text" name="sanwei[lixi][daishou]" placeholder="代收" value='{$vo.collection}' required>
			  <input type="text" name="sanwei[lixi][fandian]" placeholder="返点" value='{$vo.return}' required>
        <input type="text" name="sanwei[lixi][fangkuan_time]" placeholder="放款时间" value='{$vo.fangkuan_time}' required>
        <textarea name="sanwei[lixi][du_zhuxi]" id="edu_zhuhxi" placeholder="利息额度备注" style='width: 100%;'>{$vo.lx_remark}</textarea>
        <input type="hidden" name="sanwei[lixi][id]" value="{$vo.id}">
			  <div id ='lixi_sample' class="lixi_sample_value"><input form='hidden_color_placeholder' inori-data='color_lixi1' id="color1" type="text" name="color1" value="{$lx_color[$key]['min_lx']}" />每10万月供:￥3680(36期)</div>
			</div> -->
		 <else />
		<volist name='lx' id='vo'>

        <!-- {$key}
        span{$lx_color[$key]['min_lx']}kkk -->
        <div class="lixi_fenbu_main">


          <input type="text" name="sanwei[{$key}][lixi_min]" placeholder="最低利息" value='{$vo.min_lx}' required class = 'min_lixi'>
          <input type="text" name="sanwei[{$key}][lixi_max]" placeholder="最高利息" value='{$vo.max_lx}' required>
          <input type="text" name="sanwei[{$key}][edu_min]" placeholder="最低额度" value='{$vo.min_ed}' required>
          <input type="text" name="sanwei[{$key}][edu_max]" placeholder="最高额度" value='{$vo.max_ed}' required>

          <select name="sanwei[{$key}][huankuan]" select-data = "{$vo.repayments}" class = 'huankuan_fangshi'>
          <option value="0" selected>还款方式</option>
          <option value="等额本息">等额本息</option>
          <option value="等额本金">等额本金</option>
          <option value="等本等息">等本等息</option>
          <option value="先息后本">先息后本</option>
          </select>
          <input type="num" name = 'sanwei[{$key}][fenqi_max]' placeholder="最长分期 1~360" value='{$vo.installment_fq}' required class="max_time">
          <input type="text" name="sanwei[{$key}][fangkuan_shouxufei]" placeholder="放款手续费" value='{$vo.handling}' required>
          <input type="text" name="sanwei[{$key}][daishou]" placeholder="代收" value='{$vo.collection}' required>
          <input type="text" name="sanwei[{$key}][fandian]" placeholder="返点" value='{$vo.return}' required>

          <input type="text" name="sanwei[{$key}][fangkuan_time]" placeholder="放款时间" value='{$vo.fangkuan_time}' required>

          <textarea name="sanwei[{$key}][du_zhuxi]" id="edu_zhuhxi" placeholder="利息额度备注" style='width: 100%;'>{$vo.lx_remark}</textarea>

          <!-- 循环要点：input 的 inori-data 与下边模板的 id        绑定，自增或者库读取都行 -->
          <!-- 循环要点：input 的 id         与下边模板的 inori-data绑定，自增或者库读取都行 -->
          <input type="hidden" name="sanwei[{$key}][id]" value="{$vo.id}">
          <div class="lixi_sample_value"><input form='hidden_color_placeholder' inori-data='color_had_lixi_{$key}' id="color_had_{$key}" type="text" name="color1" value="{$lx_color[$key]['min_lx']}" />每10万月供:￥<span class="lixi_recal" id = 'lixi_recal_{$vo.id}'></span>(36期)<span class='shouldMind' style='display:none;'>36期后还本</span><span id="remove_this_lixi" onclick="deleteThisLX(this)"><img src="/Application/Admin/View/Public/images/set_chanpin_popup/u566.png" alt="u566" style="width:100%"></span></div>
        </div>
        <script id = 'php_lixi_script_{$key}'>
          // 用于确定最后一条利息条数
          setTimeout( _ => { window.lixi_count = {$key}; $('#php_lixi_script_{$key}').remove() }, 0)

        </script>
		</volist>
		 </empty>
      </div>

       <div class="tag_setting sec_box">
        <div class="title">设置标签</div>
        <div class="small_title">产品小类</div>
        <div class="multi_row_xiaolei_tag_search">
          <div class="tag_search_list"><textarea name="xiaolei_tag_list" id="xiaolei_tag_list" class="tag_list" required style='display:none;'></textarea></div>
          <div class="tag_row" id="xiaolei_tag_list_button" tag-type='cp_temp'>
			<!-- <volist name='type' id='vo'>
				<span class="tag_content"><a inori-data='{$vo.name}' id = '{$vo.id}'>{$vo.name}</a></span>
			</volist> -->
            <div id='add_new_tag_content'></div>
          </div>
        </div>
        <div id="hidden_tag" style="display:none;">
         <!-- <volist name='type' id='vo'>
				    <input type="checkbox" name="check_shouru[]" value = '{$vo.id}' id="{$vo.name}">
		      </volist> -->
        </div>
        <div id="hdden_free_form_wrap">
          <input type="hidden" id="hidden_free_url_base" name="DIY表单结构" value="{:U('Wxauthorise/sm_ajax')}" form="not_submit">
          <input type="hidden" id="hidden_free_data_url_base" name="DIY表单数据" value="{:U('Wxauthorise/add_xiaolei')}" form="not_submit">
          <input type="hidden" id='hiddenFreeCounter' name="hiddenFreeCounter" value="1" form='not_submit'>
          <script>
            // 单选值的选项值，serializeArray()得到
            window.single = {}
            window.inori_func = {}
            window.inori_var = {}
          </script>
          <!--
           一个div一个id，id值为 `hidden_free_${uid}`
           一个div包一个小类的所有hidden_free_form
          -->

        </div>
        <div style="width:100%;height:40px;"></div>

        <!-- 收入 shouru-->
        <div class="small_title">收入标签</div>
        <div class="multi_row_shouru_tag_search">
          <div class="shouru_tag_search_list"><textarea name="shouru_tag_list" id="shouru_tag_list" class="tag_list"></textarea></div>
          <div class="tag_row" id="shouru_tag_list_button" tag-type='revenue'>
			<volist name='type1' id='vo'>
				<span class="tag_content"><a inori-data='{$vo.name}' id = '{$vo.id}' right-click='true'>{$vo.name}</a></span>
			</volist>
          </div>
        </div>
        <div id="shouru_hidden_tag" style="display:none;">
			<volist name='type1' id='vo'>
				<input type="checkbox" name="check_shouru[]" value = '{$vo.id}' id="{$vo.name}">
			</volist>
		</div>
        <hr style="width:95%;color:#ccc;text-align:center;">

        <!-- 进件标签 jinjian -->
        <div class="small_title">进件标签</div>
        <div class="multi_row_jinjian_tag_search">
          <div class="jinjian_tag_search_list"><textarea name="jinjian_tag_list" id="jinjian_tag_list" class="tag_list"></textarea></div>
          <div class="tag_row" id="jinjian_tag_list_button" tag-type='jinjian'>
           <volist name='type2' id='vo'>
				<span class="tag_content"><a inori-data='{$vo.name}' id = '{$vo.id}' right-click='true'>{$vo.name}</a></span>
			</volist>
          </div>
        </div>
        <div id="jinjian_hidden_tag" style="display:none;">
			<volist name='type2' id='vo'>
				<input type="checkbox" name="check_jinjian[]" value = '{$vo.id}' id="{$vo.name}">
			</volist>
		</div>
        <hr style="width:95%;color:#ccc;text-align:center;">

        <!-- 利息额度 lixiedu -->
        <div class="small_title">利息额度</div>
        <div class="multi_row_lixiedu_tag_search">
          <div class="lixiedu_tag_search_list"><textarea name="lixiedu_tag_list" id="lixiedu_tag_list" class="tag_list"></textarea></div>
          <div class="tag_row" id="lixiedu_tag_list_button" tag-type='lx'>
             <volist name='type3' id='vo'>
				<span class="tag_content"><a inori-data='{$vo.name}' id = '{$vo.id}' right-click='true'>{$vo.name}</a></span>
			</volist>
          </div>
        </div>
        <div id="lixiedu_hidden_tag" style="display:none;">
			<volist name='type3' id='vo'>
				<input type="checkbox" name="check_lixiedu[]" value = '{$vo.id}' id="{$vo.name}">
			</volist>
		</div>
        <hr style="width:95%;color:#ccc;text-align:center;">

        <!-- 考核标签 kaohe -->
        <div class="small_title">考核标签</div>
        <div class="multi_row_kaohe_tag_search">
          <div class="kaohe_tag_search_list"><textarea name="kaohe_tag_list" id="kaohe_tag_list" class="tag_list"></textarea></div>
          <div class="tag_row" id="kaohe_tag_list_button" tag-type='assessment'>
            <volist name='type4' id='vo'>
				<span class="tag_content"><a inori-data='{$vo.name}' id = '{$vo.id}' right-click='true'>{$vo.name}</a></span>
			</volist>
          </div>
        </div>
        <div id="kaohe_hidden_tag" style="display:none;">
			<volist name='type4' id='vo'>
				<input type="checkbox" name="check_kaohe[]" value = '{$vo.id}' id="{$vo.name}">
			</volist>
		</div>
        <hr style="width:95%;color:#ccc;text-align:center;">

        <!-- 时间维度 shijian -->
        <div class="small_title">时间维度</div>
        <div class="multi_row_shijian_tag_search">
          <div class="shijian_tag_search_list"><textarea name="shijian_tag_list" id="shijian_tag_list" class="tag_list"></textarea></div>
          <div class="tag_row" id="shijian_tag_list_button" tag-type='datami'>
            <volist name='type5' id='vo'>
				<span class="tag_content"><a inori-data='{$vo.name}' id = '{$vo.id}' right-click='true'>{$vo.name}</a></span>
			</volist>
          </div>
        </div>
        <div id="shijian_hidden_tag" style="display:none;">
			<volist name='type5' id='vo'>
				<input type="checkbox" name="check_shijian[]" value = '{$vo.id}' id="{$vo.name}">
			</volist>
		</div>
        <hr style="width:95%;color:#ccc;text-align:center;">

        <!-- 地区维度 diqu -->
        <div class="small_title">地区维度</div>
        <div class="multi_row_diqu_tag_search">
          <div class="diqu_tag_search_list"><textarea name="diqu_tag_list" id="diqu_tag_list" class="tag_list"></textarea></div>
          <div class="tag_row" id="diqu_tag_list_button" tag-type='area'>
           <volist name='type6' id='vo'>
				<span class="tag_content"><a inori-data='{$vo.name}' id = '{$vo.id}' right-click='true'>{$vo.name}</a></span>
			</volist>
          </div>
        </div>
        <div id="diqu_hidden_tag" style="display:none;">
			<volist name='type6' id='vo'>
				<input type="checkbox" name="check_diqu[]" value = '{$vo.id}' id="{$vo.name}">
			</volist>
		</div>
        <hr style="width:95%;color:#ccc;text-align:center;">

        <!-- 特殊标签 tesu -->
        <div class="small_title">特殊标签</div>
        <div class="multi_row_teshu_tag_search">
          <div class="teshu_tag_search_list"><textarea name="teshu_tag_list" id="teshu_tag_list" class="tag_list"></textarea></div>
          <div class="tag_row" id="teshu_tag_list_button" tag-type='especial'>
            <volist name='type7' id='vo'>
				<span class="tag_content"><a inori-data='{$vo.name}' id = '{$vo.id}' right-click='true'>{$vo.name}</a></span>
			</volist>
          </div>
        </div>
        <div id="teshu_hidden_tag" style="display:none;">
			<volist name='type7' id='vo'>
				<input type="checkbox" name="check_teshu[]" value = '{$vo.id}' id="{$vo.name}">
			</volist>
		</div>
        <hr style="width:95%;color:#ccc;text-align:center;">
      </div>

      <div class="yaoqiu_textarea sec_box">
        <div class="title">详细要求</div>
        <div class="textarea_wrap">
          <textarea name="yiban" id="yiban" placeholder="一般详细要求" required>{$goods.general}</textarea>
          <input class='color_picker_others color_picker_yiban' form='hidden_color_placeholder' inori-data='yiban_color' type="text" name="color2" value="{$goods_color.general}" />
        </div>

        <div class="textarea_wrap">
          <textarea name="jinjian" id="jinjian" placeholder="进件详细要求" required>{$goods.jjdetail}</textarea>
          <input inori-data='jinjian_color' class='color_picker_others color_picker_jinjian' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.jjdetail}" />
        </div>

        <div class="textarea_wrap">
          <textarea name="zhengxin" id="zhengxin" placeholder="征信详细要求" required>{$goods.letter}</textarea>
          <input inori-data='zhengxin_color' class='color_picker_others color_picker_zhengxin' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.letter}" />
        </div>

        <div class="textarea_wrap">
          <textarea name="fuzai" id="fuzai" placeholder="负债详细要求" required>{$goods.debt}</textarea>
          <input inori-data='fuzai_color' class='color_picker_others color_picker_fuzai' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.debt}" />
        </div>

        <div class="textarea_wrap">
          <textarea name="shouru" id="shouru" placeholder="收入详细要求" required>{$goods.revenue_yq}</textarea>
          <input inori-data='shouru_color' class='color_picker_others color_picker_shouru' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.revenue_yq}" />
        </div>

      </div>

      <!-- <div class="zhengxin sec_box" style="display:none;">
        <div class="title">征信要求</div>
        <textarea name="yiban" id="yiban" cols="30" rows="10"></textarea>
        <textarea name="jinjian" id="jinjian" cols="30" rows="10"></textarea>
        <textarea name="zhengxin" id="zhengxin" cols="30" rows="10"></textarea>
        <textarea name="fuzai" id="fuzai" cols="30" rows="10"></textarea>
        <textarea name="shouru" id="fuzai" cols="30" rows="10"></textarea>
      </div> -->

      <script>

        function inori(_this) {
          console.log(_this)
          _this.getElementsByTagName('input')[0].checked=true
        }
        function inori1() {
           var kaohe_length = $(".if_all_kaohe input:checkbox:checked").length
           if ( kaohe_length === 0) {
            $('#if_all_kaohe').css('display', 'none')
            $.each($('#if_all_kaohe input'), function() {
              this.checked = false
              $(this).attr('disabled', true)
            })
           } else if ( kaohe_length > 0) {
            $.each($('#if_all_kaohe input'), function() {
              $(this).attr('disabled', false)
            })
            $('#if_all_kaohe').css('display', 'inline-block')
           }
        }
      </script>
      <div class="kaohe_box sec_box">
        <div class="title">考核要求</div>
        <div class="textarea_wrap" style='float:left;width:35%;min-height:15rem;z-index:1;'>
          <textarea name="zonggn" id="kaohe_gongnue" placeholder="总攻略" required style="margin:0;">{$goods.zonggn}</textarea>
          <input class='color_picker_others color_picker_kaohe_gongnue' form='hidden_color_placeholder' inori-data='kaohe_color' type="text" name="color1" value="{$goods_color.zonggn}" />
        </div>
        <div class="right" style="z-index:1;">
          <div class="kaohe_line">
            <span>电核单位</span>
            <label><input checked type="radio" name="danwei" id="danwei_1" value="必须真实">必须真实</label>
            <label><input type="radio" name="danwei" id="danwei_2" value="抽样电核">抽样电核</label>
            <label><input type="radio" name="danwei" id="danwei_3" value="可以沟通">可以沟通</label>
            <label><input type="radio" name="danwei" id="danwei_4" value="不电核单位">不电核单位</label>
            <label onclick="inori(this)"><input type="radio" name="danwei" id="danwei_5" value="5"><input type="text" name="danwei_zidingyi" placeholder="自定义"  onchange="zidinyi_change(this)"></label>
            <input inori-data='danwei_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.unit_type}" />
          </div>
          <div class="kaohe_line">
            <span>电核配偶</span>
            <label><input checked type="radio" name="peiou" id="peiou_1" value="必须真实">必须真实</label>
            <label><input type="radio" name="peiou" id="peiou_2" value="抽样电核">抽样电核</label>
            <label><input type="radio" name="peiou" id="peiou_3" value="可以沟通">可以沟通</label>
            <label><input type="radio" name="peiou" id="peiou_4" value="不电核配偶">不电核配偶</label>
            <label onclick="inori(this)"><input type="radio" name="peiou" id="peiou_5" value="5"><input type="text" name="peiou_zidingyi" placeholder="自定义"  onchange="zidinyi_change(this)"></label>
            <input inori-data='peiou_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.spouse_type}" />
            <br>
          </div>
          <div class="kaohe_line">
            <span>电核直系</span>
            <label><input checked type="radio" name="zhixi" id="zhixi_1" value="必须真实">必须真实</label>
            <label><input type="radio" name="zhixi" id="zhixi_2" value="抽样电核">抽样电核</label>
            <label><input type="radio" name="zhixi" id="zhixi_3" value="可以沟通">可以沟通</label>
            <label><input type="radio" name="zhixi" id="zhixi_4" value="不电核直系">不电核直系</label>
            <label onclick="inori(this)"><input type="radio" name="zhixi" id="zhixi_5" value="5"><input type="text" name="zhixi_zidingyi" placeholder="自定义"  onchange="zidinyi_change(this)"></label>
            <input inori-data='zhixi_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.zhixi_type}" />
            <br>
          </div>
          <div class="kaohe_line">
            <span>电核亲属</span>
            <label><input checked type="radio" name="qingsu" id="qingsu_1" value="必须真实">必须真实</label>
            <label><input type="radio" name="qingsu" id="qingsu_2" value="抽样电核">抽样电核</label>
            <label><input type="radio" name="qingsu" id="qingsu_3" value="可以沟通">可以沟通</label>
            <label><input type="radio" name="qingsu" id="qingsu_4" value="不电核亲属">不电核亲属</label>
            <label onclick="inori(this)"><input type="radio" name="qingsu" id="qingsu_5" value="5"><input type="text" name="qingsu_zidingyi" placeholder="自定义"   onchange="zidinyi_change(this)"></label>
            <input inori-data='qingsu_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.relatives_type}" />
            <br>
          </div>
          <div class="kaohe_line">
            <span>电核同事</span>
            <label><input checked type="radio" name="tongshi" id="tongshi_1" value="必须真实">必须真实</label>
            <label><input type="radio" name="tongshi" id="tongshi_2" value="抽样电核">抽样电核</label>
            <label><input type="radio" name="tongshi" id="tongshi_3" value="可以沟通">可以沟通</label>
            <label><input type="radio" name="tongshi" id="tongshi_4" value="不电核同事">不电核同事</label>
            <label onclick="inori(this)"><input type="radio" name="tongshi" id="tongshi_5" value="5"><input type="text" name="tongshi_zidingyi" placeholder="自定义"   onchange="zidinyi_change(this)"></label>
            <input inori-data='tongshi_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.colleagues_type}" />
            <br>
          </div>
          <div class="kaohe_line">
            <span>电核朋友</span>
            <label><input checked type="radio" name="pengyou" id="pengyou_1" value="必须真实">必须真实</label>
            <label><input type="radio" name="pengyou" id="pengyou_2" value="抽样电核">抽样电核</label>
            <label><input type="radio" name="pengyou" id="pengyou_3" value="可以沟通">可以沟通</label>
            <label><input type="radio" name="pengyou" id="pengyou_4" value="不电核朋友">不电核朋友</label>
            <label onclick="inori(this)"><input type="radio" name="pengyou" id="pengyou_5" value="5"><input type="text" name="pengyou_zidingyi" placeholder="自定义"   onchange="zidinyi_change(this)"></label>
            <input inori-data='pengyou_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.friend_type}" />
            <br>
          </div>
          <div class="kaohe_line">
            <span>查大数据</span>
            <label><input checked type="radio" name="dashuju" id="dashuju_1" value="肯定查">肯定查</label>
            <label><input type="radio" name="dashuju" id="dashuju_2" value="抽查">抽查</label>
            <label><input type="radio" name="dashuju" id="dashuju_3" value="肯定不查">肯定不查</label>
            <input inori-data='dashuju_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.data_type}" />
          </div>
          <div class="kaohe_line">
            <span>查同盾</span>
            <label><input checked type="radio" name="tongdun" id="tongdun_1" value="肯定查">肯定查</label>
            <label><input type="radio" name="tongdun" id="tongdun_2" value="抽查">抽查</label>
            <label><input type="radio" name="tongdun" id="tongdun_3" value="肯定不查">肯定不查</label>
            <input inori-data='tongdun_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.shield}" />
          </div>
          <div class="kaohe_line">
            <span>查民间</span>
            <label><input checked type="radio" name="minjian" id="minjian_1" value="肯定查">肯定查</label>
            <label><input type="radio" name="minjian" id="minjian_2" value="抽查">抽查</label>
            <label><input type="radio" name="minjian" id="minjian_3" value="肯定不查">肯定不查</label>
            <input inori-data='minjian_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.folk}" />
          </div>
          <div class="kaohe_line">
            <span>查流水</span>
            <label><input checked type="radio" name="liushui" id="liushui_1" value="肯定查">肯定查</label>
            <label><input type="radio" name="liushui" id="liushui_2" value="抽查">抽查</label>
            <label><input type="radio" name="liushui" id="liushui_3" value="肯定不查">肯定不查</label>
            <input inori-data='liushui_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value='{$goods_color.liushui}' />
          </div>
          <div class="kaohe_line">
            <span>查征信显示</span>
            <label style='max-width:11%;'><input checked type="radio" name="chazhengxin" id="chazhengxin_1" value="不查征信">不查征信</label>
            <label style='max-width:11%;'><input type="radio" name="chazhengxin" id="chazhengxin_2" value="自查征信">自查征信</label>
            <label style='max-width:10%;'><input type="radio" name="chazhengxin" id="chazhengxin_3" value="查人行">贷款审批</label>
            <label style='max-width:10%;'><input type="radio" name="chazhengxin" id="chazhengxin_4" value="保前审批">保前审批</label>
            <label style='max-width:13%;'><input type="radio" name="chazhengxin" id="chazhengxin_5" value="信用卡审批">信用卡审批</label>
            <label style='max-width:13%;'><input type="radio" name="chazhengxin" id="chazhengxin_6" value="查鹏元">查鹏元</label>
            <input inori-data='chazhengxin_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.letterzhengxin}" />
          </div>
          <div class="kaohe_line">
            <span>上征信显示</span>
            <select name="zhengxin_xianshi" id="zhengxin_xianshi">
              <volist name='qudao_list' id='qudao_list'>
                <option value="{$qudao_list.qudao_nick_name}">{$qudao_list.qudao_nick_name}</option>
              </volist>
            </select>
            <input inori-data='zhengxin_xianshi_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.zhengxin_xianshi}" />
          </div>
          <div class="kaohe_line">
            <span>放款方式</span>
            <select name="fangkuan_fangshi_se" id="fangkuan_fangshi_se" required>
              <option value="现金放款" selected>现金放款</option>
              <option value="信用卡方式">信用卡方式</option>
              <option value="贷贷卡方式">贷贷卡方式</option>
              <option value="消费卡方式">消费卡方式</option>
            </select>
            <input inori-data='fangkuan_fangshi_se_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.lendingfangshi}" />
          </div>
          <div class="kaohe_line if_all_kaohe" onclick="inori1()">
            <span>上门考察</span>
            <label><input type="checkbox" name="shangmen[]" id="shangmen_1" value="单位">单位</label>
            <label><input type="checkbox" name="shangmen[]" id="shangmen_2" value="住址">住址</label>
            <label><input type="checkbox" name="shangmen[]" id="shangmen_3" value="房产">房产</label>
            <div class="if_all_kaohe" id = 'if_all_kaohe' style='display:none;'>
              <label><input checked type="radio" name="kaocha" id="quanbu_kaocha" value="全部核查">全部考察</label>
              <label><input type="radio" name="kaocha" id="choucha_kaocha" value="部分核查">抽查</label>
            </div>
            <input inori-data='shangmen_color' class='color_picker_others color_picker_kaohe' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.inspection_type}" />
          </div>
        </div>
        <div class="title" style="clear:both;">准入要求</div>
        <div class="textarea_wrap" style='float:left;width:35%;min-height:19.5rem;z-index:1;'>
          <textarea name="zhunru" id="kaohe_gongnue" placeholder="准入要求" style="margin:0;">{$goods.zhunruyaoqiu}</textarea>
          <input inori-data='zhunru_color' class='color_picker_others color_picker_zhunruyaoqiu' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.zhunruyaoqiu}" />
        </div>
        <div class="right">
          <div class="kaohe_line">
            <span>进件年龄： </span>
               <input required type="number" name="jinjian_nianling_min" id="jinjian_nianling_max" placeholder="最低年龄" value='{$goods.age_min}'>
               <span style="display:inline-block;width:3rem;text-align:center;">~</span>
               <input required type="number" name="jinjian_nianling_max" id="jinjian_nianling_max" placeholder="最低年龄" value='{$goods.age_max}'>
                <input inori-data='jinjian_nianling_min_color' class='color_picker_others color_picker_zhunruyaoqiu' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.age_min}" />
          </div>
          <div class="kaohe_line">
            <span>收入身份： </span>
            <label><input checked type="radio" name="jinjian_shourushenfen" id="jinjian_shourushenfen_1" value="必须工薪">必须工薪</label>
            <label><input type="radio" name="jinjian_shourushenfen" id="jinjian_shourushenfen_2" value="必须自雇">必须自雇</label>
            <label><input type="radio" name="jinjian_shourushenfen" id="jinjian_shourushenfen_3" value="两者皆可">两者皆可</label>
            <input inori-data='jinjian_shourushenfen_color' class='color_picker_others color_picker_zhunruyaoqiu' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.shourshenfen}" />
          </div>
          <div class="kaohe_line">
            <span>无业身份： </span>
              <label><input checked type="radio" name="jinjian_wuye" id="jinjian_wuye_1" value="不能进件">不能进件</label>
              <label><input type="radio" name="jinjian_wuye" id="jinjian_wuye_2" value="可以进件">可以进件</label>
              <label><input type="radio" name="jinjian_wuye" id="jinjian_wuye_3" value="有条件进件">有条件进件</label>
              <input inori-data='jinjian_wuye_color' class='color_picker_others color_picker_zhunruyaoqiu' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.jinjian_wuye}" />
          </div>
          <div class="kaohe_line">
            <span>性别： </span>
              <label><input checked type="radio" name="jinjian_xingbie" id="jinjian_xingbie_1" value="必须男性">必须男性</label>
              <label><input type="radio" name="jinjian_xingbie" id="jinjian_xingbie_2" value="必须女性">必须女性</label>
              <label><input type="radio" name="jinjian_xingbie" id="jinjian_xingbie_3" value="两者皆可">两者皆可</label>
              <input inori-data='jinjian_xingbie_color' class='color_picker_others color_picker_zhunruyaoqiu' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.gender}" />
            </div>
          <div class="kaohe_line">
            <span>信用身份： </span>
              <label style="width:30.6%;"><input checked type="radio" name="jinjian_xinyong" id="jinjian_xinyong_1" value="必须本地信用记录">必须本地信用记录</label>
              <label><input type="radio" name="jinjian_xinyong" id="jinjian_xinyong_2" value="接受白户">接受白户</label>
              <input inori-data='jinjian_xinyong_color' class='color_picker_others color_picker_zhunruyaoqiu' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.xinyongshenf}" />
            </div>
          <div class="kaohe_line">
            <span>已婚双签： </span>
              <label><input checked type="radio" name="jinjian_yihun" id="jinjian_yihun_1" value="不能双签">不能双签</label>
              <label><input type="radio" name="jinjian_yihun" id="jinjian_yihun_2" value="必须双签">必须双签</label>
              <label><input type="radio" name="jinjian_yihun" id="jinjian_yihun_3" value="双签提额">双签提额</label>
              <input inori-data='jinjian_yihun_color' class='color_picker_others color_picker_zhunruyaoqiu' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.yihun}" />
          </div>
        </div>
        <div class="textarea_wrap">
          <textarea name="jinjian_ziliao" id="ziliao" placeholder="进件所需资料" style="float:none;">{$goods.jinjianrequired}</textarea>
          <input inori-data='jinjian_ziliao_color' class='color_picker_others color_picker_ziliao' style='margin-top: 189px;' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.jinjianrequired}" />
        </div>
      </div>
      <input type='hidden' name='did' value='{$did}'>
      <!-- 征信组件 -->
      <!-- <script src="__PUBLIC__/script/zhengxin_component.js"></script> -->
      <x-zhengxin class="sec_box">
        <!-- <div class="title">征信查询<span id = 'x_zhengxin_title'><img src="__PUBLIC__/images/set_chanpin_popup/u546.png" alt="u546" style="width:100%"></span><br></div> -->
        <div class="title">征信查询</div>
        <div class="zhengxin_check_box">
          <div class="zhengxin_check_line">
            <select name="zhengxin_check_if" id="zhengxin_check_if">
              <option value="0" checked>不看查询次数</option>
              <option value="1">看查询次数</option>
            </select>
            <div class="zhengxin_check_count_method_wrap">
              <label for="x_zhengxin_zhengxin_check_count_method">
                <div>查询计算标准<br>(ctrl键可多选)</div>
              </label>
              <input style='display:none;' type="checkbox" name="调整是否显示" id='x_zhengxin_zhengxin_check_count_method'>
              <select name="zhengxin_check_count_method" id="zhengxin_check_count_method" multiple>
                <option value="贷款申请" checked>贷款申请</option>
                <option value="信用卡查询">信用卡查询</option>
                <option value="个人查询">个人查询</option>
                <option value="保前审批">保前审批</option>
              </select>
            </div>
          </div>
        </div>
        <div class="yuqi_check_box">
          <div class="yuqi_check_line">
            <select name="yuqi_check_if" id="yuqi_check_if">
              <option value="0" checked>不看人行征信</option>
              <option value="1">看人行征信</option>
            </select>
          </div>
        </div>
      </x-zhengxin>
      <div class="hangye_ban sec_box">
        <div class="title">禁入行业</div>
        <label><input checked type="checkbox" name="jinzhi[]" value='公检法'>公检法</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='公交司机'>公交司机</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='美容'>美容</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='美发'>美发</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='快递公司'>快递公司</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='安保员'>安保员</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='高风险职业'>高风险职业</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='娱乐行业+休闲行业'>娱乐行业+休闲行业</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='保险行业'>保险行业</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='地产中介'>地产中介</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='金融投资行业'>金融投资行业</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='工厂一线员工'>工厂一线员工</label>
        <label><input checked type="checkbox" name="jinzhi[]" value='城管'>城管</label>
        <input inori-data='jinzhi_color' class='color_picker_others color_picker_jinzhi' form='hidden_color_placeholder' type="text" name="color2" value="{$goods_color.forbade}" />
      </div>

     <x-guanlian class="sec_box" btn-img-url='__PUBLIC__/images/set_chanpin_popup/u645.png'>
       <!-- 关联产品 -->
       <div class="title">关联产品</div>
       <div class="placeholder">添加关联产品<span id="add_new_guanlian_table" style="visibility: visible;"><img src="/wx-tp/Application/Admin/View/Public/images/set_chanpin_popup/u546.png" alt="u546"></span></div>
       <div class="main_wraper">
         <div class="main_table">
           <ul style="background-image:url('__PUBLIC__/images/set_chanpin_popup/u645.png');margin-bottom:0;">
             <li class="line_1">产品大类</li>
             <li class="line_2">产品小类</li>
             <li class="line_3">产品小名</li>
             <li class="line_4">修改关联理由</li>
             <li class="line_5"><div style='visibility:hidden;pointer-events:none;' class="btn btn_modifiy" style="background-image:url('__PUBLIC__/images/set_chanpin_popup/u645.png');">修改关联理由</div></li>
             <li class="line_6"><div style='visibility:hidden;pointer-events:none;' class="btn btn_del">删除</div></li>
           </ul>
           <volist name="new_x_data[3]" id='vo'>
            <ul>
             <li class="line_1">{$vo.daleiid|biaoqian_name}</li>
             <li class="line_2">{$vo.cp_class|biaoqian_name}</li>
             <li class="line_3" inori-data-id='1'>{$vo.link_g_id|re_litter_name}</li>
             <li class="line_4">{$vo.link_reason}</li>
             <li class="line_5"><div class="btn btn_modifiy" style="background-image:url('__PUBLIC__/images/set_chanpin_popup/u645.png');">修改关联理由</div></li>
             <li class="line_6"><div class="btn btn_del" onclick='deleThisGuanlianLine(this, event)'>删除</div></li>
             <input type='hidden' class='lineGuanlianID' value='{$vo.goods_link_id}'>
           </ul>
         </volist>
       <!--<ul>
             <li class="line_1">房产信用类</li>
             <li class="line_2">保单贷</li>
             <li class="line_3" inori-data-id='2'>牛逼贷牛逼贷牛逼贷牛逼贷牛逼贷牛逼贷牛逼贷牛逼贷牛逼贷牛逼贷</li>
             <li class="line_4">两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近两个产品十分相近</li>
             <li class="line_5"><div class="btn btn_modifiy" style="background-image:url('__PUBLIC__/images/set_chanpin_popup/u645.png');">修改关联理由</div></li>
             <li class="line_6"><div class="btn btn_del" onclick='deleThisGuanlianLine(this, event)'>删除</div></li>
             <input type='hidden' class='lineGuanlianID' value='2'>
           </ul> -->
         </div>
         <div class="btn" id='add_new_guanlian' style="background-image:url('__PUBLIC__/images/set_chanpin_popup/u645.png');">修改</div>
       </div>
     </x-guanlian>

     <x-tuijian class="sec_box">
      <div class="title">设置推荐</div>
      <label for="tuijian" style='line-height: 3rem;height: 3rem;'><input style="
        -webkit-appearance: checkbox;
        margin: 0;
        padding: 0;
        min-width: unset;
        height: 100%;
        vertical-align: middle;
        outline: 0;
      " type="checkbox" name="tuijian" id="tuijian" form="not_submit"><span>设置推荐产品</span><input type="text" name='tuijian_reason' form="not_submit" placeholder="推荐理由"></label>
      <input type="hidden" name="推荐组件id" value="null" id="x-tuijian-id">
     </x-tuijian>

     <x-haibao class="sec_box">
       <!-- 有id就填id，没有就按着我的原样null -->
       <input type="hidden" name="海报id" id='x_haibao_id' value='null' form='not_submit'>
      <div class="title">广告推广</div>
      <div class="haibao_wrap">
        <div class="haibao_img">
          <label for="haibao_img">
            <img src="__PUBLIC__/images/ad_bk.png" alt="推广">
            <!-- <img src="__PUBLIC__/images/set_chanpin_popup/u706.png" alt="推广"> -->
            <!-- <input type="file" name="hiabao_img" id="hiabao_img" form='not_submit' style="display:none;"> -->
            <div class="zizhanghao_logo"><img src="__PUBLIC__/images/u311.png" alt="子账号logo"></div>
            <div class="haibao_pro_name"></div>
            <div class="lixi_content"></div>
            <div class="adv_content"></div>
            <div class="zizhanghao_name">子账号名称</div>
          </label>
        </div>
        <div class="haibao_content">
          <div class="content_head">产品名称</div>
          <label><input autocomplete='off' type="radio" form='not_submit' name="tuiguang_chanpin" id="tuiguang_name_1" value="0">真实名字</label><br>
          <label><input autocomplete='off' type="radio" form='not_submit' name="tuiguang_chanpin" id="tuiguang_name_2" value="1">自定义名字</label><br>
          <label><input autocomplete='off' type="radio" form='not_submit' name="tuiguang_chanpin" id="tuiguang_name_3" value="2">不显示名字</label><br>
          <label><input autocomplete='off' type="radio" form='not_submit' name="tuiguang_chanpin" id="tuiguang_name_5" value="3">自定义<input type="text" name="tuiguang_chanpin_zidingyi" autocomplete='off'></label><br>
          <input autocomplete='off' type="text" form='not_submit' name="tuiguang_edu_miaosu" id='tuiguang_edu_miaosu' placeholder="利息额度描述" style='padding:0;margin:0;margin-top:.5rem;width:25rem;'>
          <br>
          <input autocomplete='off' type="text" form='not_submit' name="tuiguang_adv_miaosu" id='tuiguang_adv_miaosu' placeholder="优势描述语" style='padding:0;margin:0;margin-top:.5rem;width:25rem;'>
        </div>
      </div>
     </x-haibao>

      <input type="submit" id="submit" value="确认提交" onclick="checkData(this, event)" style='line-height:3rem;border:1px solid #000;border-radius:4px;padding:4px 1rem;'>
      <div style='height:2rem;width:100%;'></div>
    </form>
  </div>

  <div id='color_form_hidden_wrap' style='display:none;'>
    <!-- 占位表单 -->
    <form id='hidden_color_placeholder' autocomplete="off"></form>
    <!-- end 占位表单 -->

    <!-- 利息颜色表单 -->

    <div id="color_form_inside">
      <!-- <form id = 'color_lixi0'>
        <input value='#000000' type="text" name="sanwei[lixi][min_lx]" id="sanwei[lixi][lixi_min]">
        <input value='#000000' type="text" name="sanwei[lixi][max_lx]" id="sanwei[lixi][lixi_max]">
        <input value='#000000' type="text" name="sanwei[lixi][min_ed]" id="sanwei[lixi][edu_min]">
        <input value='#000000' type="text" name="sanwei[lixi][max_ed]" id="sanwei[lixi][edu_max]">
        <input value='#000000' type="text" name="sanwei[lixi][repayments]" id="sanwei[lixi][huankuan]">
        <input value='#000000' type="text" name="sanwei[lixi][installment_fq]" id="sanwei[lixi][fenqi_max]">
        <input value='#000000' type="text" name="sanwei[lixi][handling]" id="sanwei[lixi][fangkuan_shouxufei]">
        <input value='#000000' type="text" name="sanwei[lixi][collection]" id="sanwei[lixi][daishou]">
        <input value='#000000' type="text" name="sanwei[lixi][return]" id="sanwei[lixi][fandian]">
        <input value='#000000' type="text" name="sanwei[lixi][fangkuan_time]" id="sanwei[lixi][fangkuan_time]">
        <input value='#000000' type="text" name="sanwei[lixi][lx_remark]" id="sanwei[lixi][du_zhuxi]">
      </form> -->
      <div id="color_had_inside">
        <!-- 循环模板 -->
        <volist name='lx_color' id='vo'>
            <!-- spam{$key}{$vo.min_ed}kkk -->
          <form id = 'color_had_lixi_{$key}' inori-data='color_had_{$key}' autocomplete="off">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][min_lx]" id="sanwei[lixi][lixi_min]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][max_lx]" id="sanwei[lixi][lixi_max]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][min_ed]" id="sanwei[lixi][edu_min]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][max_ed]" id="sanwei[lixi][edu_max]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][repayments]" id="sanwei[lixi][huankuan]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][installment_fq]" id="sanwei[lixi][fenqi_max]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][handling]" id="sanwei[lixi][fangkuan_shouxufei]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][collection]" id="sanwei[lixi][daishou]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][return]" id="sanwei[lixi][fandian]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][fangkuan_time]" id="sanwei[lixi][fangkuan_time]">
            <input value='{$vo.min_ed}' type="text" name="sanwei[lixi][lx_remark]" id="sanwei[lixi][du_zhuxi]">
          </form>
        </volist>
      </div>
    </div>
     <!-- end 利息颜色表单 -->


    <!-- 颜色表单 -->
    <form action="{:U('ajax_color')}" method="post" id = 'color_form' autocomplete="off">

      <!-- id -->
      <input type='hidden' name='g_id' value='{$info}'>
      <!-- 跟着 -->
      <input type="text" name="did" id="did_color"  value='{$did}'>

      <!-- 大类 -->
      <!-- 传实际值 -->
      <input required type="text" name="dalei" id="dalei_color">

      <!-- 标签 -->

      <!-- 详细要求 -->
      <input value='{$goods_color.general}' type="text" name='general' id='yiban_color'>
      <input value='{$goods_color.jjdetail}' type="text" name='jjdetail' id='jinjian_color'>
      <input value='{$goods_color.letter}' type="text" name='letter' id='zhengxin_color'>
      <input value='{$goods_color.debt}' type="text" name='debt' id='fuzai_color'>
      <input value='{$goods_color.revenue_yq}' type="text" name='revenue_yq' id='shouru_color'>

      <!-- 考核 -->
      <input value='{$goods_color.zonggn}' type="text" name="zonggn" id="kaohe_color">
      <input value='{$goods_color.unit_type}' type="text" name="unit_type" id="danwei_color">
      <input value='{$goods_color.danwei_zidingyi}' type="text" name="danwei_zidingyi" id="danwei_zidingyi_color">
      <input value='{$goods_color.spouse_type}' type="text" name="spouse_type" id="peiou_color">
      <input value='{$goods_color.peiou_zidingyi}' type="text" name="peiou_zidingyi" id="peiou_zidingyi_color">
      <input value='{$goods_color.zhixi_type}' type="text" name="zhixi_type" id="zhixi_color">
      <input value='{$goods_color.zhixi_zhidingyi}' type="text" name="zhixi_zhidingyi" id="zhixi_zidingyi_color">
      <input value='{$goods_color.relatives_type}' type="text" name="relatives_type" id="qingsu_color">
      <input value='{$goods_color.qingsu_zidingyi}' type="text" name="qingsu_zidingyi" id="qingsu_zidingyi_color">
      <input value='{$goods_color.colleagues_type}' type="text" name="colleagues_type" id="tongshi_color">
      <input value='{$goods_color.tongshi_zidingyi}' type="text" name="tongshi_zidingyi" id="tongshi_zidingyi_color">
      <input value='{$goods_color.friend_type}' type="text" name="friend_type" id="pengyou_color">
      <input value='{$goods_color.pengyou_zidingyi}' type="text" name="pengyou_zidingyi" id="pengyou_zidingyi_color">
      <input value='{$goods_color.data_type}' type="text" name="data_type" id="dashuju_color">
      <input value='{$goods_color.shield}' type="text" name="shield" id="tongdun_color">
      <input value='{$goods_color.folk}' type="text" name="folk" id="minjian_color">
      <input value='{$goods_color.liushui}' type="text" name="liushui" id="liushui_color">
      <input value='{$goods_color.letterzhengxin}' type="text" name="letterzhengxin" id="chazhengxin_color">
      <input value='{$goods_color.zhengxin_xianshi}' type="text" name="zhengxin_xianshi" id="zhengxin_xianshi_color">
      <input value='{$goods_color.lendingfangshi}' type="text" name="lendingfangshi" id="fangkuan_fangshi_se_color">
      <!-- 上门考核 数组 -->
      <input value='{$goods_color.inspection_type}' type="text" name="inspection_type" id="shangmen_color">

      <input value='{$goods_color.zhunruyaoqiu}' type="text" name="zhunruyaoqiu" id="zhunru_color">
      <input value='{$goods_color.age_min}' type="text" name="age_min" id="jinjian_nianling_min_color">
      <input value='{$goods_color.age_max}' type="text" name="age_max" id="jinjian_nianling_max_color"><!--注意-->
      <input value='{$goods_color.shourshenfen}' type="text" name="shourshenfen" id="jinjian_shourushenfen_color">
      <input value='{$goods_color.jinjian_wuye}' type="text" name="jinjian_wuye" id="jinjian_wuye_color">
      <input value='{$goods_color.gender}' type="text" name="gender" id="jinjian_xingbie_color">
      <input value='{$goods_color.xinyongshenf}' type="text" name="xinyongshenf" id="jinjian_xinyong_color">
      <input value='{$goods_color.yihun}' type="text" name="yihun" id="jinjian_yihun_color">
      <input value='{$goods_color.jinjianrequired}' type="text" name="jinjianrequired" id="jinjian_ziliao_color">

      <!-- 禁止 行业 数组 -->
      <input value='{$goods_color.forbade}' type="text" name="forbade" id="jinzhi_color">
      <input value='{$goods_color.kaocha}' type="text" name="kaocha" id="kaocha_color">

    </form>
  </div>
  <!-- <input type="button" value="点我提交color" form='color_form' id='color_form_button'> -->
  <script>
    // 目前有：shouru jinjian lixiedu kaohe shijian diqu teshu
    window.tagList = ['Inoriq', '社会']
    window.tagList.shouru = ['Inoriw', '社会1']
    window.tagList.jinjian = ['Inorie', '社会2']
    window.tagList.lixiedu = ['Inorir', '社会3']
    window.tagList.kaohe = ['Inorit', '社会4']
    window.tagList.shijian = ['Inoriy', '社会5']
    window.tagList.diqu = ['Inoriu', '社会6']
    window.tagList.teshu = ['Inorii', '社会7']
  </script>
  <script id='var_script'>
    let test = ''
    let backVar = {
      tag: {},
      xiangxi: {},
      yaoqiu: {}
    }
    backVar.dalei = '{$goods.daleiID}'

    // 标签
    window.backVar = {}
    window.backVar.tag_check_ori = backVar.tag_check_ori = `{$abc}`
    // backVar.tag.check 最终结果是一个数组,bm_id组成
    try {
      backVar.tag.check = JSON.parse(window.backVar.tag_check_ori).cpclass.map((value, index, array)=>{return value.bm_id})
    } catch (err) {
      console.log(err)
    }
    backVar.tag.check_shouru = `{$goods.revenue}`.split(',').filter((cur) => {if(cur.length>0) return true});
    backVar.tag.check_jinjian = `{$goods.jinjian}`.split(',').filter((cur) => {if(cur.length>0) return true});
    backVar.tag.check_lixiedu = `{$goods.lx}`.split(',').filter((cur) => {if(cur.length>0) return true});
    backVar.tag.check_kaohe = `{$goods.assessment}`.split(',').filter((cur) => {if(cur.length>0) return true});
    backVar.tag.check_shijian = `{$goods.datami}`.split(',').filter((cur) => {if(cur.length>0) return true});
    backVar.tag.check_diqu = `{$goods.area}`.split(',').filter((cur) => {if(cur.length>0) return true});
    backVar.tag.check_teshu = `{$goods.especial}`.split(',').filter((cur) => {if(cur.length>0) return true});

    // 详细要求
    backVar.xiangxi.yiban = `{$goods.general}`;
    backVar.xiangxi.jinjian = `{$goods.jjdetail}`;
    backVar.xiangxi.zhengxin = `{$goods.letter}`;
    backVar.xiangxi.fuzai = `{$goods.debt}`;
    backVar.xiangxi.shouru = `{$goods.revenue_yq}`;

    // 各大要求
    backVar.yaoqiu.danwei = `{$goods.unit_type}`;
    backVar.yaoqiu.peiou = `{$goods.spouse_type}`;
    backVar.yaoqiu.zhixi = `{$goods.zhixi_type}`;
    backVar.yaoqiu.qingsu = `{$goods.relatives_type}`;
    backVar.yaoqiu.tongshi = `{$goods.colleagues_type}`;
    backVar.yaoqiu.pengyou = `{$goods.friend_type}`;
    backVar.yaoqiu.dashuju = `{$goods.data_type}`;
    backVar.yaoqiu.tongdun = `{$goods.shield_type}`;
    backVar.yaoqiu.minjian = `{$goods.folk_type}`;
    backVar.yaoqiu.liushui = `{$goods.liushui}`;
    backVar.yaoqiu.chazhengxin = `{$goods.letterzhengxin}`;
    backVar.yaoqiu.fangkuan_fangshi_se = `{$goods.lendingfangshi}`;
    backVar.yaoqiu.zhengxin_xianshi = `{$goods.zhengxin_xianshi}`;// 上征信显示
    backVar.yaoqiu.shangmen = `{$goods.inspection_type}`.split(',').filter((cur) => {if(cur.length>0) return true});
    backVar.yaoqiu.kaocha = `{$goods.kaocha}`;
    backVar.yaoqiu.zhunru = `{$goods.zhunruyaoqiu}`;
    backVar.yaoqiu.jinjian_nianling_min = `{$goods.age_min}`;
    backVar.yaoqiu.jinjian_nianling_max = `{$goods.age_max}`;
    backVar.yaoqiu.jinjian_shourushenfen = `{$goods.shourshenfen}`;
    backVar.yaoqiu.jinjian_wuye = `{$goods.jinjian_wuye}`;
    backVar.yaoqiu.jinjian_xingbie = `{$goods.gender}`;
    backVar.yaoqiu.jinjian_xinyong = `{$goods.xinyongshenf}`;
    backVar.yaoqiu.jinjian_yihun = `{$goods.yihun}`;
    backVar.yaoqiu.jinjian_ziliao = `{$goods.jinjianrequired}`;
    backVar.yaoqiu.jinzhi = `{$goods.forbade}`;
    console.dir(backVar)

    function zidinyi_change (_this) {
      $(_this).prev().val($(_this).val())
      $(_this).prev().prop('checked', true)
    }
  </script>
  <script src="__PUBLIC__/script/add_adv_chanpin.js"></script>
  <script src="__PUBLIC__/script/tag_system.js" ></script>
  <script src="__PUBLIC__/script/color_system.js" ></script>
  <script src="__PUBLIC__/script/write_back.js"></script>

  <!-- script标签：提醒tag -->
  <script id='tag_remind'>
    // 目前有：shouru jinjian lixiedu kaohe shijian diqu teshu
    var list = ['shouru','jinjian','lixiedu','kaohe','shijian','diqu','teshu']
    $.each(list, function (k, v) {
      tagManage(v)
      addClickListener(v)
    })
    // 检测是否有session baseName 内容供发送邮件
    if(!localStorage.getItem(`baseName${location.href.match(/did\/(\d{1,})\./)[1]}`) || localStorage.getItem(`baseName${location.href.match(/did\/(\d{1,})\./)[1]}`) === '') {
      alert('无法邮件通知内容！请从商品列表进入本页！')
      $('body').empty()
    }
  </script>

  <!-- 特性检测，不支持相关属性的浏览器将会进行跳转 -->
  <script id='modernizr'>
    let htmlEle = $("html[class*='no']")
    if (htmlEle.length === 1) {
      alert('侦测到您所使用的浏览器存在漏洞！请更新您的浏览器。')
      window.location = '__PUBLIC__/page/newBrowser.html'
    }
  </script>
  <script>
    function openFreeMultipleOption(MultipleTemplName) {
      layer.open({
        type: 2,
        area: ['700px', '450px'],
        title: '填写多选选型',
        // fixed: false,
        shadeClose: true,
        content: `__PUBLIC__/page/public_m_option_add.html?templName=${MultipleTemplName}`
      })
    }
    function openFreeSingleOption(singleTemplName) {
      layer.open({
        type: 2,
        area: ['700px', '450px'],
        title: '填写单选选型',
        // fixed: false,
        shadeClose: true,
        content: `__PUBLIC__/page/public_option_add.html?templName=${singleTemplName}`
      })
    }
  </script>

  <script id ='submit_top_lever_script'>

    // 数据验证函数
    function checkData (_this, evt) {
      // 检测是否有填写小类
      if ($('#xiaolei_tag_list').val().split(',').length === 1 && $('#xiaolei_tag_list').val().split(',')[0] === '') {
        alert('请选择大类并选取至少一个小类')
        evt.preventDefault()
        throw new Error('请选择大类并选取至少一个小类')
      }
      if ($('.hdden_free_wrap > .button').length > 0) {
        alert('请先保存DIY表单，无论是否填写过')
        evt.preventDefault()
        throw new Error('请选择大类并选取至少一个小类')
      }
    }
    // 表单提交函数
    function submit_top_lever (_this, evt) {
      // 提交关联数据
      layer.msg(`正在提交 关联数据 。。。`)
      try {
        submitGuanlian()
      } catch (err) {
        evt.preventDefault()
        // return false
        throw err
      }
      // 提交海报广告数据
      layer.msg(`正在提交 海报广告数据 。。。`)
      try {
        submitADnHaibao()
      } catch (err) {
        evt.preventDefault()
        // return false
        throw err
      }
      // 提交推荐数据
      layer.msg(`正在提交 推荐数据 。。。`)
      try {
        submitTuijian()
      } catch (err) {
        evt.preventDefault()
        // return false
        throw err
      }
      // 提交征信数据
      layer.msg(`正在提交 征信数据 。。。`)
      try {
        submitZhengxin()
      } catch (err) {
        evt.preventDefault()
        // return false
        throw err
      }
      // 提交征信逾期数据
      layer.msg(`正在提交 征信逾期数据 。。。`)
      try {
        submtZhengxinYuqi()
      } catch (err) {
        evt.preventDefault()
        // return false
        throw err
      }
      // 如果上边的数据没提交成功将不会进行下边步骤
        let colorData = $(`#color_form`).serializeArray()

        // 尚未提交的新数据
        let tempForm = []
        for(let i = 0; i <= window.lixi_count; i++) {
          let formDiv = $(`#color_lixi${i}`)
          tempForm.push(formDiv.serializeArray())
          console.log(formDiv)
        }

        // 已经提交的数据
        let had_color = $('#color_had_inside form')
        for(let e of had_color) {
          let had_temp = $(e).serializeArray()
          tempForm.push(had_temp)
        }
        tempForm = tempForm.filter((item) => {return item.length > 0})
        if (tempForm.length > 0) colorData.push(tempForm)

        // debug点
        console.dir(colorData)

        let url_base = $(`#color_form`).attr('action')
debugger
        $.ajax({
          type: 'POST',
          url: url_base,
          data: {data: colorData},
          async: false,
          cache: false
        })
        .done(function(data){
            console.log(data);
            if (typeof data === 'object') {
              /**
               * data = {
               *   i: data[i],
               *   i: [j,j]
               * }
              */
              // 测试用例：
              // data = {color_goods_id:5, color_lx_id:[34]}
              // data = {color_goods_id:5, color_lx_id:[34, 35]}
              for(let i of Object.keys(data)) {
                if (typeof data[i] === 'object') {
                  let temp = 0
                  for(let j in data[i]) {
                    $('#all').append(`<input type='hidden' name='${i}[lixi${temp++}]' value='${data[i][j]}'>`)
                  }
                } else if(typeof data[i] === 'string' || typeof data[i] === 'number') {
                  $('#all').append(`<input type='hidden' name='${i}' value='${data[i]}'>`)
                }
              }
            }
            window.i = true
        })
        .fail(() => {window.i = false})
debugger
        if (window.i) {
          // 依据要求将数组转为字符串
          // class 为 check_diy_xiaolei
          let genString = () => {
            let tempArr = []
            $('.check_diy_xiaolei').each(function () {
              tempArr.push(String($(this).val()))
              $(this).remove()
            })
            if (tempArr.length > 0) {
              let tempEle = `<input class='check_diy_xiaolei' type='hidden' name = 'check_xiaolei[]' value='${tempArr.join(',')}'>`
              $('#all').append(tempEle)
            }
          }
          genString()
          // 发送产品邮件
          let mailFlag = false
          const mail_content = localStorage.getItem(`baseName${location.href.match(/did\/(\d{1,})\./)[1]}`)
          $.ajax(`{:U('Home/Index/send_msg')}`, {
            type: 'post',
            data: {
              msg: `${mail_content}`
            },
            cache: false,
            async: false,
            beforeSend: () => {
              window.alert('正在等待产品经理的邮件确认，请稍侯。。。')
            }
          }).done((res) => {
            window.alert('发送成功')
            mailFlag = true
            localStorage.setItem(`baseName${location.href.match(/did\/(\d{1,})\./)[1]}`, '')
          })
          if (mailFlag) {
            return true
          } else {
            mailFlag = window.confirm('邮件未成功投递，继续发布需要您线下通知产品经理，是否继续确认发布产品？')
            if (!mailFlag) setTimeout(() => {location.reload(true)}, 100)
            else return true
          }
        }

        else {
          evt.preventDefault()
          return false
        }
    }
  </script>
  <script id='color_picker_script'>
    $(document).ready(function () {

      // 回填选择后的值
      // 利息计算函数
      lixi_calc()
      for(let e of $('.huankuan_fangshi')) {
        $(e).val($(e).attr('select-data'))
        $(e).change()
      }

      writeBackxiangxi()
      // writeBackXiaoleiTag()
      writeBackTag()

      // 拿到 已填写 的color表单
      let colorTarget = $('#color_had_inside form')
      // 循环每一个
      for(let e of colorTarget) {
        // 拿到 对应颜色选择器 的id
        let id = $(e).attr('inori-data')
        // 用id来作为
        $(`#${id}`).colorPicker(
          {
            onColorChange: function ( id, newValue) {
              // 要改变值的元素集合父id
              let targetID = $(this).prev('input').attr('inori-data')
              // 要改变值的元素集合
              let targetEle = $(`#${targetID} input`)
              for( let ele of targetEle) {
                $(ele).val(newValue)
              }
            }
          }
        )
        $(`#${id}`).change()
      }
    })
  </script>
  <!-- <script>
      $(document).ready(function(){
        // 如果没有利息就默认点击一条出来
        if($('.lixi_fenbu_main').length === 0) {
          $('#add_new_lixi').click()
        }
      })
  </script> -->
</body>
</html>